package com.example.zg3_park.CarType.add

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.ArrayAdapter
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.example.lib_base.mvvm.BaseActivity
import com.example.zg3_park.CarType.CarTypeViewModel
import com.example.zg3_park.R
import com.example.zg3_park.databinding.ActivityXiuParkBinding
import dagger.hilt.android.AndroidEntryPoint

@Route(path = "/app/XiuParkActivity")
@AndroidEntryPoint
class XiuParkActivity : BaseActivity<ActivityXiuParkBinding,CarTypeViewModel>() {
    @Autowired
    @JvmField
    var pid = 0

    var area = "A区停车场"
    var areaId = 0
    var type = "标准车位"
    var status = "空闲"
    override fun intiView() {
        ARouter.getInstance().inject(this)
        binding.ivBack.setOnClickListener {
            finish()
        }

        //区域
        val areas = arrayOf("A区停车场","B区停车场","C区停车场")
        val areaAdapter = ArrayAdapter(this,android.R.layout.simple_spinner_item,areas)
        areaAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
        binding.spArea.adapter = areaAdapter

        val types = arrayOf("标准车位","VIP车位")
        val typeAdapter = ArrayAdapter(this,android.R.layout.simple_spinner_item,types)
        typeAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
        binding.spType.adapter = typeAdapter
    }

    override fun intiData() {

    }
}